import pandas as pd
import numpy as np

rng = pd.date_range('3/6/2012 00:00', periods=5, freq='D')
ts = pd.Series(np.random.randn(len(rng)), rng)

# 时区
ts_utc = ts.tz_localize('UTC')
print(ts_utc)
print("-" * 22)

# 转换为其他时区
ts_utc = ts_utc.tz_convert('US/Eastern')
print(ts_utc)
